<include file="Base/header" /> 	
<div class="page-container">
	<include file="Base/menu" /> 
	<div class="page-content">
		<div class="container-fluid">
			<div class="row-fluid">
					<div class="span12"> 
						<!-- BEGIN PAGE TITLE & BREADCRUMB-->
						<h3 class="page-title">
						</h3>
						<ul class="breadcrumb">
							<li>
								<i class="icon-home"></i>
								<a href="/index.php/Admin/">首页</a> 
								<i class="icon-angle-right"></i>
							</li>
							<li><a href="/index.php/Admin/Other">工具</a></li>
						</ul>
						<!-- END PAGE TITLE & BREADCRUMB-->
					</div>
			</div>
			<div class="row-fluid">
					<div class="span12">
						<!-- BEGIN EXAMPLE TABLE PORTLET-->
						<div class="portlet box blue">
							<div class="portlet-title">
								<div class="caption"><i class="icon-globe"></i>捕鼠盒记录表</div>
								<div class="tools">
									<a href="javascript:;" class="collapse"></a>
									<a href="javascript:;" class="reload"></a>
									<a href="javascript:;" class="remove"></a>
								</div>
							</div>
							<div class="portlet-body">
                                <!-- <div class="clearfix">
                                    <div class="btn-group">
                                        <a href="__CONTROLLER__/DeviceAdd"><button id="sample_editable_1_new" class="btn green">
                                        新增&nbsp;&nbsp;<i class="icon-plus"></i>
                                        </button></a>
                                    </div>
                                </div> -->
                                <div id="sample_1_wrapper" class="dataTables_wrapper form-inline" role="grid">
                                <div class="row-fluid">
                                    
                                    <div class="span6">
                                    <form method="get" action="__URL__/MouseBox" >
                                        <div id="sample_1_length" class="dataTables_length">
                                            <select size="1" id="mySelect" name="page_size" aria-controls="sample_1" class="m-wrap small" onchange="submit(this.value)">
                                                <option id="page10" value="10">10</option>
                                                <option id="page20" value="20">20</option>
                                                <option id="page50" value="50">50</option>
                                                <option id="page100" value="100">100</option>
                                            </select> 条/每页</label>
                                        </div>
                                    </form>
                                    </div>
                                    <div class="span6">
                                        <!-- <div class="dataTables_filter" id="sample_1_filter">
                                            <label>
                                                <a href="__MODULE__/Export/User">
                                                <button id="" class="btn green">导出&nbsp;&nbsp;<i class="icon-plus"></i></button>
                                                </a>
                                            </label>
                                        </div> -->
                                    </div>
                                    
                                </div>
<table class="table table-striped table-bordered table-hover dataTable" id="sample_1" aria-describedby="sample_1_info">
    <thead>
        <tr role="row">
            <!-- <th style="width: 24px;" class="sorting_disabled" role="columnheader"
            rowspan="1" colspan="1" aria-label="">
                <div class="checker">
                    <span>
                        <input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes">
                    </span>
                </div>
            </th> -->
            <!-- <th class="sorting" role="columnheader" tabindex="0" aria-controls="sample_1"
            rowspan="1" colspan="1" aria-label="" style="width: 20px;">
                ID
            </th> -->
            <th style="width: 40px;">
                GL编号
            </th>
           
            <th style="width: 100px;">
                爬虫每月记录表
            </th>
            <!-- <th class="hidden-480 sorting_disabled" role="columnheader" rowspan="1"
            colspan="1" aria-label="Joined" style="width: 50px;">
                管理
             </th> -->

        </tr>
    </thead>
    <tbody role="alert" aria-live="polite" aria-relevant="all">
    <foreach name="data" item="vo"> 
     <tr class="gradeX odd">
            <!-- <td class=" sorting_1">
                <div class="checker">
                    <span>
                        <input type="checkbox" class="checkboxes" value="1">
                    </span>
                </div>
            </td> -->
            <th style="display: none; ">dd</th>
            <td class="hidden-480 ">{$vo.id}</td>
            <td data-sparkline="{$vo.yue1},{$vo.yue2},{$vo.yue3},{$vo.yue4},{$vo.yue5},{$vo.yue6},{$vo.yue7},{$vo.yue8},{$vo.yue9},{$vo.yue10},{$vo.yue11},{$vo.yue12}"></td>
            <!-- <td class="center hidden-480 ">
                <a href="{:U('Admin/Shop/edit',array('id'=>$vo['id']))}" style="cursor: pointer;">
                   编辑
                </a>
                <a id="del" onclick="del({$vo.id})" style="cursor: pointer;">
                   删除
                </a>
            </td> -->
        </tr>
    </foreach>
    </tbody>
</table>

                                        <div class="dataTables_length" id="sample_1_length">
                                            <label>
                                                <input placeholder="总结：" id="search" name="user_name" type="text" class="m-wrap medium">
                                                <button onclick="shousuo()" class="btn green">搜索&nbsp;&nbsp;<i class="icon-plus"></i></button>
                                            </label>
                                        </div>
                                        <div class="controls">
                                            <textarea class="span10 m-wrap" rows="3" id="buttons">总结:</textarea>
                                        </div>
<!-- 分页 -->
<div class="row-fluid">
    <div class="span6">
        <div class="dataTables_info" id="sample_1_info">
          共{$count}条数据记录。
        </div>
    </div>
    <div class="span6">
        <div class="dataTables_paginate paging_bootstrap pagination">
            {$page}
        </div>
    </div>
</div>								
								</div>
							</div>
						</div>
						<!-- END EXAMPLE TABLE PORTLET-->
					</div>
				</div>
		</div>
	</div>
</div>
<include file="Base/footer" /> 
<script src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
<script src="http://cdn.hcharts.cn/highstock/highstock.js"></script>
<script src="http://cdn.hcharts.cn/highmaps/highmaps.js"></script>
<script src="__PUBLIC__/plugins/layer/layer.min.js"></script>
<script type="text/javascript">
function shousuo(id){
    keywords = $("#search").val();
    layer.open({
        type: 2,
        area: ['1000px', '700px'],
        fixed: false, //不固定
        maxmin: true,
        content: "__MODULE__/Search/index/keywords/"+keywords,
    });
}

</script>
<script type="text/javascript">
function del(id){
    $.ajax({
        type:'POST',
        dataType: "json",
        url: "{:U('Admin/Shop/shopDel')}",
        data: {"id":id},
        success:  function(result){
            if(result.status==1){
                layer.alert(result.info,function(){self.location="__MODULE__/Shop/index";});
            }else if(result.status==0){
                //失败
                layer.alert(result.info);
            }
        }
    });
}
$(function () {
    /**
     * Create a constructor for sparklines that takes some sensible defaults and merges in the individual
     * chart options. This function is also available from the jQuery plugin as $(element).highcharts('SparkLine').
     */
    Highcharts.SparkLine = function (a, b, c) {
        var hasRenderToArg = typeof a === 'string' || a.nodeName,
            options = arguments[hasRenderToArg ? 1 : 0],
            defaultOptions = {
                chart: {
                    renderTo: (options.chart && options.chart.renderTo) || this,
                    backgroundColor: null,
                    borderWidth: 0,
                    type: 'area',
                    margin: [2, 0, 2, 0, 2],
                    width: 360,
                    height: 60,
                    style: {
                        overflow: 'visible'
                    },
                    skipClone: true
                },
                title: {
                    text: ''
                },
                credits: {
                    enabled: false
                },
                xAxis: {
                    labels: {
                        enabled: false
                    },
                    title: {
                        text: null
                    },
                    startOnTick: false,
                    endOnTick: false,
                    tickPositions: []
                },
                yAxis: {
                    endOnTick: false,
                    startOnTick: false,
                    labels: {
                        enabled: false
                    },
                    title: {
                        text: null
                    },
                    tickPositions: [0]
                },
                legend: {
                    enabled: false
                },
                tooltip: {
                    backgroundColor: null,
                    borderWidth: 0,
                    shadow: false,
                    useHTML: true,
                    hideDelay: 0,
                    shared: true,
                    padding: 0,
                    positioner: function (w, h, point) {
                        return { x: point.plotX - w / 2, y: point.plotY - h };
                    }
                },
                plotOptions: {
                    series: {
                        animation: false,
                        lineWidth: 1,
                        shadow: false,
                        states: {
                            hover: {
                                lineWidth: 1
                            }
                        },
                        marker: {
                            radius: 1,
                            states: {
                                hover: {
                                    radius: 2
                                }
                            }
                        },
                        fillOpacity: 0.25
                    },
                    column: {
                        negativeColor: '#910000',
                        borderColor: 'silver'
                    }
                }
            };
        options = Highcharts.merge(defaultOptions, options);
        return hasRenderToArg ?
            new Highcharts.Chart(a, options, c) :
        new Highcharts.Chart(options, b);
    };
    var start = +new Date(),
        $tds = $('td[data-sparkline]'),
        fullLen = $tds.length,
        n = 0;
    // Creating 153 sparkline charts is quite fast in modern browsers, but IE8 and mobile
    // can take some seconds, so we split the input into chunks and apply them in timeouts
    // in order avoid locking up the browser process and allow interaction.
    function doChunk() {
        var time = +new Date(),
            i,
            len = $tds.length,
            $td,
            stringdata,
            arr,
            data,
            chart;
        for (i = 0; i < len; i += 1) {
            $td = $($tds[i]);
            stringdata = $td.data('sparkline');
            arr = stringdata.split('; ');
            data = $.map(arr[0].split(','), parseFloat);
            chart = {};
            if (arr[1]) {
                chart.type = arr[1];
            }
            $td.highcharts('SparkLine', {
                series: [{
                    data: data,
                    pointStart: 1
                }],
                tooltip: {
                    headerFormat: '<span>' + $td.parent().find('th').html() + ', Q{point.x}:</span><br/>',
                    pointFormat: '<b>{point.y}</b> 量'
                },
                chart: chart
            });
            n += 1;
            // If the process takes too much time, run a timeout to allow interaction with the browser
            if (new Date() - time > 500) {
                $tds.splice(0, i + 1);
                setTimeout(doChunk, 0);
                break;
            }
            // Print a feedback on the performance
            if (n === fullLen) {
                $('#result').html('Generated ' + fullLen + ' sparklines in ' + (new Date() - start) + ' ms');
            }
        }
    }
    doChunk();
});
</script>
<script language="javascript" type="text/javascript">
    function submit(){
        $.ajax({
            type:"get",
            url:"index?page_size",
            async:false,
        })
    }
    element=document.getElementById('page'+{$Think.session.page_size});
    element.setAttribute("selected","selected");
</script>